
<html xmlns:ng="http://angularjs.org"  ng-app='myApp' >
	<head>
		<!--DEFINE O DOMINIO PARA RODAR OS LINKS ESTATICOS -->
		<base href= <?php echo httpServer?> />

		<meta charset='utf-8'>
		<title>Usuario</title>
		
		<script src="./php/lib/angularjs/angular.js"></script>
		<script src="./php/lib/angularjs/utils.js" ></script>
		<script src="./view/moduloGeral/js/perfil.js" ></script>
		<script src="./php/lib/bootstrap/js/ui-bootstrap.js" ></script>
		<script src="./php/lib/bootstrap/js/bootstrap.js" ></script>
		<script type="text/javascript" src="./php/lib/grid/lib/jquery-1.9.1.js"></script>
    	<script type="text/javascript" src="./php/lib/grid/build/ng-grid.debug.js"></script>
    	
		<link rel="stylesheet" href="./php/lib/estilos/Style.css"/>
		<link rel="stylesheet" href="./php/lib/bootstrap/css/bootstrap.css"/>
		<link rel="stylesheet" type="text/css" href="./php/lib/grid/ng-grid.css" />
		
		<script src="./view/componentes/js/menu.js" ></script>
		<script src="./view/componentes/js/mensagem.js" ></script>
		<script src="./view/componentes/js/zoom.js" ></script>
		
	</head>
	<body ng-controller="MyCtrl" >
		
		<!--INCLUI O MENU -->
		<my-menu> </my-menu>
		 
		<?php include("./view/componentes/html/mensagem.php") ?> 
		<?php include("./view/componentes/html/zoom.php") ?> 
		
		<!-- CADASTRO DE PERFIL - INICIO -->
		<div class="container_perfil"  data-ng-init="init()">
	     	<div class="panel panel-success">
				<div class="panel-heading">
			    	<h3 class="panel-title">Perfil</h3>
			  	</div>
			  	
			  	<div class="panel-body">
			  		<!-- INICIO DO FORMULARIO -->
			  		<tabset justified="true" >
			  			
			  			<!-- ABA DADOS USUARIO -->
						<tab heading="Dados Perfil">
				  			<div class="form-horizontal auturaPerfil">
						    	<div class="control-group">
						    		<span class="control-label">Código</span>
									<div class="controls form-inline">
										<input type="text" class="input-mini" ng-model="perfilObj.id" disabled="true">
									    <button id="btnOpenZoom" class="btnZoom" ng-click="abrirZoom()"><img src="./php/lib/img/localizar.png"></button>
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label" >Descrição</label>
									<div class="controls">
										<input type="text" ng-model="perfilObj.descricao" class="perfilDescricao" required>
									</div>
								</div>		
							</div>
						</tab>
						<!-- ABA DADOS ACESSO -->
						<tab heading="Dados Acesso">
							<form class="form-horizontal">
						    	 <div class="control-group">
									<label class="control-label" for="cbbModulo">Módulo</label>
									<div class="controls">
										<select ng-model="perfilObj.cbbModulo" class="comboModulo" 
												ng-options="itens.id as itens.descricao for itens in dtpModulos">
										</select>
										
										<button class="btn" ng-click="adicionaModuloGrid()"><img src="./php/lib/img/adicionar_menor.png"> Adicionar</button>
									</div>
								</div>
								
								<div class="control-group">
									<div class="gridModuloPerfil" ng-grid="gridModulos"></div>
									<div class="btnRemover">
										<button id="btnRemover" class="btn" ng-click="removerModuloGrid()"><img src="./php/lib/img/remover.png"> Excluir</button>
									</div>
								</div>
							</form>
						</tab>
								
					 </tabset>
					<!-- FIM DO FORMULARIO -->  
					
					<div class="btn-toolbar buttonBarPerfil">
					    <div class="btn-group">
					    	<button class="btn" id="btnExcluir" ng-click="confirmacaoDeletar()" ng-disabled="desabilitaExcluir"><img src="./php/lib/img/remover.png"> Excluir</button>
					    </div>
					    <div class="btn-group">
					    	<button class="btn" id="btnLimpar" ng-click="limpar()"><img src="./php/lib/img/refresh.png"> Limpar</button>
					    </div>
					    <div class="btn-group">
					    	<button class="btn" id="btnSalvar" ng-click="gravar()"><img src="./php/lib/img/save.png"> Salvar</button>
					    </div>
				    </div>
				    
			  	</div>	
			</div>
			
		</div>
		<!-- CADASTRO DE PERFIL - FIM -->
		
	</body>
</html>